<template>
  <view class="mine-infoitem-page">
    <view class="mine-infoitem-content">
      <view class="mine-infoitem-flex">
        <view>登录账号</view>
        <view>{{ accountName }}</view>
      </view>
      <view class="mine-infoitem-flex" @click="gotoUpdatePassword">
        <view>修改密码</view>
        <view class="m-t-38rpx">
          <up-icon name="arrow-right" color="#cccccc" size="32rpx"></up-icon>
        </view>
      </view>
    </view>
    <view class="login-out" @click="logout">退出登录</view>
    <view class="seize-seat"></view>
  </view>
</template>

<script setup lang="ts">
import { logout } from "@/api/_user"
const accountName = ref('')
onMounted(() => {
  accountName.value = uni.getStorageSync('account')
})

function gotoUpdatePassword() {
  uni.navigateTo({
    url: '/pages/updatePassword/index'
  })
}

</script>

<style scoped>
.mine-infoitem-page {
  padding: 0 24rpx;
}

.mine-infoitem-content {
  margin-top: 24rpx;
  background-color: #fff;
  border-radius: 16rpx;
}

.mine-infoitem-flex {
  display: flex;
  justify-content: space-between;
  line-height: 108rpx;
  padding-left: 24rpx;
  padding-right: 36rpx;
}

.login-out {
  position: fixed;
  bottom: 69rpx;
  left: 0;
  width: 100%;
  height: 120rpx;
  line-height: 120rpx;
  text-align: center;
  background-color: #fff;
}

.seize-seat {
  width: 100%;
  height: 68rpx;
  background-color: #fff;
  border-top: 1rpx solid #eee;
  position: fixed;
  bottom: 0;
}
</style>
